package cn.fancy.sdk.wxapi;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import com.tencent.mm.opensdk.modelbase.BaseReq;
import com.tencent.mm.opensdk.modelbase.BaseResp;
import com.tencent.mm.opensdk.openapi.IWXAPI;
import com.tencent.mm.opensdk.openapi.IWXAPIEventHandler;
import com.tencent.mm.opensdk.openapi.WXAPIFactory;

/**
 * Created by zhaojh on date 3/18/21
 */
public class WXEntryActivity extends Activity implements IWXAPIEventHandler {
    
    private IWXAPI iwxapi;
    
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        iwxapi = WXAPIFactory.createWXAPI(this, "wxb1c59b30147edab7", true);
        iwxapi.registerApp("wxb1c59b30147edab7");
        iwxapi.handleIntent(getIntent(), this);
    }
    
    @Override
    public void onReq(BaseReq baseReq) {
    
    }
    
    @Override
    public void onResp(BaseResp baseResp) {
        Log.d("tagg", "tagg" + baseResp.errStr);
    }
}
